package de.slowlog;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class SlowLog {

	private List<SlowLogEntry> entries = new ArrayList<>();

	public void addEntry(SlowLogEntry entry) {
		entries.add(entry);
	}

	public List<SlowLogEntry> getEntries() {
		return entries;
	}

	public Date getMinTime() {
		if (entries.isEmpty()) {
			return new Date();
		}

		return entries.get(0).getTime();
	}
}
